<template>
  <div class="skeleton-card">
    <div class="skeleton-card-item" v-for="i in rows" :key="'row-'+i">
      <div class="skeleton-label"></div>
      <div class="skeleton-field"></div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'SkeletonCard',
  props: {
    rows: {
      type: Number,
      default: 3
    }
  }
}
</script>

<style scoped>
.skeleton-card {
  padding: 20px;
}

.skeleton-card-item {
  display: flex;
  align-items: center;
  margin-bottom: 16px;
}

.skeleton-label {
  width: 80px;
  height: 16px;
  margin-right: 12px;
  background: #f2f2f2;
  border-radius: 2px;
}

.skeleton-field {
  flex: 1;
  max-width: 220px;
  height: 32px;
  background: linear-gradient(90deg, #f2f2f2 25%, #e6e6e6 50%, #f2f2f2 75%);
  background-size: 200% 100%;
  border-radius: 4px;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}
</style> 